﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TVNDBLayer.BLL;

public partial class my : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UID"] != null)
        {
            int uid = Convert.ToInt32(Session["UID"].ToString());
            if (uid > 0)
            {
                AlbumBLL album = new AlbumBLL();
                AlbumControl1.IsMy = "block";
                AlbumControl1.ClassItem = "item3";
                AlbumControl1.DataSource = album.GetAlbumByUserID(uid);
                ((MainMasterPage)Page.Master).SiteWrap = "site-wrap";
                ((MainMasterPage)Page.Master).IsShowFooter = false;
            }
            else
            {
                Response.Redirect("login.aspx?ref=" + ConfigurationManager.AppSettings["host"] + "my.aspx");
            }
        }
        else
        {
            Response.Redirect("login.aspx?ref=" + ConfigurationManager.AppSettings["host"] + "my.aspx");
        }
    }
}